Skip to content

feat(cli): name the branch first in deploy approval prompts, v0.1.33 - #215

Merged
ndbroadbent merged 2 commits into
mainfrom
nathan/approval-dialog-branch
Nov 8, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
nathan/approval-dialog-branch

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

When several agents or scripts ask for deploy approvals at once, the macOS PIN dialog didn't say which branch each approval is for. It listed the app, rack, commit and message, and the message is often a generic CI line like Deploy web 36a302d to staging. The CLI already had the branch from the request and printed it in the terminal, but the person approving usually only sees the dialog.

Dialog line (before → after):

web on staging, commit 36a302d01234: "Deploy web 36a302d to staging"
feature/fix-login: web on staging, commit 36a302d, "Deploy web 36a302d to staging"

Touch prompt and notification:

Touch your security key to approve feature/fix-login (web on staging, 2 of 4)...

A run's later approvals ask for a touch without a PIN dialog, such as wait --approve when another rack's request appears later, so the notification needs the branch too.

Details

  • approvalSummaryLine and approvalTouch (internal/cli/deploy_approvals_summary.go) serve both approve and wait --approve. A request without a branch keeps the old wording, apart from the shorter commit.
  • The branch is cut at 80 characters (maxBranchRunes), so a long branch name can't push the app and rack past the dialog's 160-character line cut.
  • Short commits are 7 characters everywhere shortCommit is used, including the terminal lines after approving.
  • The branch goes through displayText, like the other fields.

Testing: go test ./internal/cli/ passes. Two deliberate breakages confirm the new tests can fail: leaving out the branch fails five tests, and removing the 80-character cap fails the long-branch test.

The PIN dialog listed each approval as app, rack, commit and message. When several
agents ask for approvals at once, the branch is what tells them apart, so each line
now starts with it: `feature/fix-login: api on staging, commit 36a302d, "Fix login"`.

The key touch prompt and its notification name it too ("approve feature/fix-login
(api on staging, 2 of 4)"): a run's later approvals ask for a touch without a PIN
dialog, such as `wait --approve` when a rack's request appears later.

The branch is cut at 80 characters so the app and rack stay inside the dialog's
160-character line, and short commits are now 7 characters.
@deepsource-io

deepsource-io Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 705a9c3...34a4a71 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Nov 8, 2026 1:29a.m. Review ↗
Go Nov 8, 2026 1:29a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@ndbroadbent
ndbroadbent merged commit fed166b into main Nov 8, 2026
13 checks passed
@ndbroadbent
ndbroadbent deleted the nathan/approval-dialog-branch branch November 8, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant